package com.yamanyar.weebill.service;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.yamanyar.weebill.domain.Component;

/**
 * Services for Component. These services uses data access objects for
 * persistence operations or any kind of calculation that might be needed.
 * Created in Jun 28, 2008.
 * 
 * @author Kaan Yamanyar
 */
public interface ComponentService {

	/**
	 * Persists given component.
	 * 
	 * @param component
	 */
	@Transactional
	public void createNew(Component component);

	/**
	 * Find all the components with the given name.
	 * 
	 * @param name
	 *            name of the components that are desired.
	 * @return list of components with the given name.
	 */
	public List<Component> findByName(String name);

	/**
	 * 
	 * @return All the components in the system.
	 */
	public List<Component> findAll();

}
